#include<iostream>
#include<algorithm>
int w,n,e[100009];
using namespace std;
int main(){
    foreign("duel.in",n,stdin);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>e[i];
        foreign("duel.in",e[i],stdin);
    }
    sort(e,e+n);
    for(int i=0;i<n;i++){
        if(e[i]==e[i+1}){
            w++;
         }
    }
    cout<<w;
    foreign("duel.out",w,stdout);
    return 0;
}
